package com.hexinfo.dmpro.monitor.dao;

import com.hexinfo.dmpro.monitor.model.base.MonitorBaseModel;
import com.hexinfo.dmpro.monitor.model.base.MonitorReq;
import com.hexinfo.dmpro.monitor.model.cm.CmResourceData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author peng
 * @date 2022/2/28 14:33
 */
@Repository
public interface ClusterWhDao {

    List<MonitorBaseModel> selCmInfo(MonitorBaseModel monitorBaseModel);

    MonitorBaseModel queryCmInfo(@Param("cmFlag") String cmFlag,
                                 @Param("clusterFlag") String clusterFlag);

    int delHostInfo(Map map);

    int delCmInfo(Map map);

    int delCmInfoById(Set<String> ids);

    int saveCmInfo(Map map);

    int saveHostInfo(Map map);

    int upMonitorFlag(Map map);

    List<MonitorBaseModel> selCmCluster(Map map);

    List<MonitorBaseModel> selCmClusterReq(Map map);

    MonitorBaseModel selCmClusterServiceName(Map map);

    List<MonitorBaseModel> selCmHostName(Map map);

    List<Map<String,String>> selUserUnit(MonitorBaseModel monitorBaseModel);

    List<CmResourceData> cmBasicData();

    String cmImpalaMax(@Param("cmFlag") String cmFlag,
                       @Param("clusterFlag") String clusterFlag);

    String cmNum();

    MonitorReq queryAreaIdSortId(String areaId,String sortId);

}
